import { ref } from 'vue';

export default function(emits: any) {
	
	// 是否勾选协议
	const isCheckedAgreement = ref<boolean>(false);
	// 查看协议
	const openAgreement = (): void => {
		emits('openAgreement');
	};
	// 勾选同意协议
	const checkAgreement = (): void => {
		isCheckedAgreement.value = !isCheckedAgreement.value;
	};
	
	return {
		isCheckedAgreement,
		openAgreement,
		checkAgreement,
	};
}